package com.facebook.fresco.samples.showcase;

import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.fresco.samples.showcase.misc.ImageUriProvider;
import com.facebook.imagepipeline.core.ImagePipelineConfig;
import ohos.aafwk.ability.AbilityPackage;
import ohos.agp.render.Paint;
import ohos.agp.utils.Color;

public class ShowcaseApplication extends AbilityPackage {
    public static ShowcaseApplication instance;
    public static ImageUriProvider imageUriProvider;
    public static Paint testPaint;
    @Override
    public void onInitialize() {
        super.onInitialize();
        ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this).setDownsampleEnabled(false).setResizeAndRotateEnabledForNetwork(true).build();
        Fresco.initialize(this,config,null);
        instance = this;
        imageUriProvider = new ImageUriProvider();

        initTestPaint();
    }

    private void initTestPaint() {
        testPaint = new Paint();
        testPaint.setAntiAlias(true);
        testPaint.setStrokeWidth(10);
        testPaint.setStyle(Paint.Style.STROKE_STYLE);
        testPaint.setColor(Color.BLACK);
    }
}
